<!-- <script setup>
import { storeToRefs } from "pinia";
import { usePersistStore, useEmployeeStore } from "@/stores";
import { Delete, Edit } from "@element-plus/icons-vue";
const persistStore = usePersistStore();
const employeeStore = useEmployeeStore();
const { employeeList, empTotal } = storeToRefs(persistStore);
const {
  employeeQueryData,
  empAdddrawer,
  empDrawerTitle,
  empAddFormData,
  empAddForm,
  loading,
} = storeToRefs(employeeStore);
const {
  searchEmp,
  clearEmp,
  addRules,
  clearDrawEmpForm,
  handleSubmit,
  empAdd,
  empEdit,
  empPageChange,
  empSizeChange,
  empDelete,
} = employeeStore;
</script> -->
<!-- <template>
  <CardPage>
    <template #title>员工管理表</template>
    <template #button>
      <el-button type="primary" @click="empAdd">添加员工</el-button>
    </template> -->
    <!-- 查询员工信息的表单 -->
    <!-- <el-form :inline="true" class="demo-form-inline" :model="employeeQueryData">
      <el-form-item label="姓名">
        <el-input v-model="employeeQueryData.name" />
      </el-form-item>
      <el-form-item label="职位">
        <el-select
          style="width: 10vw"
          v-model="employeeQueryData.job"
          placeholder="请选择"
        >
          <el-option label="职工" :value="1" />
          <el-option label="品鉴师" :value="2" />
          <el-option label="管理员" :value="3" />
        </el-select>
      </el-form-item>

      <el-form-item>
        <el-button type="primary" @click="searchEmp">查询</el-button>
        <el-button @click="clearEmp">清空</el-button>
      </el-form-item>
    </el-form> -->
    <!-- 员工信息表 -->
    <!-- <el-table
      :data="employeeList"
      style="width: 60%; height: 25vw"
      border
      size="small"
      v-loading="loading"
    >
      <el-table-column type="index" width="" label="序号"> </el-table-column>
      <el-table-column prop="employeeId" label="员工号" width="">
      </el-table-column>
      <el-table-column prop="name" label="姓名" width=""> </el-table-column>
      <el-table-column label="职位" width="">
        <template #default="scope">
          <span v-if="scope.row.job == 1">职工</span>
          <span v-if="scope.row.job == 2">品鉴师</span>
          <span v-if="scope.row.job == 3">管理员</span>
        </template>
      </el-table-column>
      <el-table-column prop="phoneNum" label="手机号" width="">
      </el-table-column>
      <el-table-column label="操作">
        <template #default="scope">
          <el-button
            plain
            circle
            size="large"
            :icon="Edit"
            type="primary"
            @click="empEdit(scope.row)"
          >
          </el-button>
          <el-button
            plain
            circle
            size="large"
            :icon="Delete"
            type="danger"
            @click="empDelete(scope.row)"
          >
          </el-button>
        </template>
      </el-table-column>
    </el-table> -->
    <!-- 分页 -->
    <!-- <el-pagination
      v-model:current-page="employeeQueryData.page"
      v-model:page-size="employeeQueryData.pageSize"
      :page-sizes="[3, 5, 7, 10]"
      background
      layout=" sizes, prev, pager, next, jumper,total"
      :total="empTotal"
      @size-change="empSizeChange"
      @current-change="empPageChange"
    /> -->
    <!-- 员工编辑和添加的抽屉 -->
    <!-- <el-drawer v-model="empAdddrawer" size="50%">
      <CardPage>
        <template #title>{{ empDrawerTitle }}</template>

        <el-form
          label-width="auto"
          :model="empAddFormData"
          :rules="addRules"
          ref="empAddForm"
        >
          <el-form-item label="姓名" prop="name">
            <el-input
              placeholder="请输入员工姓名"
              v-model.trim="empAddFormData.name"
            />
          </el-form-item>

          <el-form-item label="职位" prop="job">
            <el-select
              v-model.number="empAddFormData.job"
              placeholder="请选择员工职位"
            >
              <el-option label="职工" :value="1" />
              <el-option label="品鉴师" :value="2" />
              <el-option label="管理员" :value="3" />
            </el-select>
          </el-form-item>
          <el-form-item label="职工号" prop="employeeId">
            <el-input
              placeholder="请输入职工号"
              v-model.trim="empAddFormData.employeeId"
            />
          </el-form-item>
          <el-form-item label="手机号" prop="phoneNum">
            <el-input
              placeholder="请输入员工手机号"
              v-model.trim="empAddFormData.phoneNum"
            />
          </el-form-item>
          <el-form-item label="身份证号" prop="identity">
            <el-input
              placeholder="请输入员工身份证号"
              v-model.trim="empAddFormData.identity"
            />
          </el-form-item>
        </el-form>
        <el-button @click="clearDrawEmpForm" style="margin-right: 1vw"
          >重置</el-button
        >
        <el-button type="primary" @click="handleSubmit">提交</el-button>
      </CardPage>
    </el-drawer>
  </CardPage>
</template> -->
<!-- <style scoped>
.el-pagination {
  margin: 3vw 40vw;
}
.el-drawer .el-button {
  width: 3vw;
  margin: 3vw 1vw;
  float: right;
}
</style> -->
